package com.dongdongqiang.common.query;


import java.io.Serializable;

/**
 * 搜索分页提交表单
 * Created by zhangzhenbin on 2017/1/3.
 */
public class PageSearchForm implements Serializable{
    private Integer pageSize = 10;              //分页大小
    private Integer page = 1;               //页数
    private String orderBy;

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }
    public Integer getPageIndex() {
        int pageIndex = 0;
        if(page > 0)
            pageIndex = (page-1) * pageSize;
        return pageIndex;
    }
}
